{extend name="public/nav"}

{block name="main"}
<div class="admin-content">
    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">系统设置</strong> / <small>System Setup</small></div>
    </div>

    <hr/>

    <div class="am-g">

      <div class="am-u-sm-8 am-u-md-4 am-u-md-push-8">

      </div>

      <div class="am-u-sm-8 am-u-md-8 am-u-md-pull-4">
        <form class="am-form am-form-horizontal" method="post" action="{:U('conf/update')}" id="conf_update">
          <div class="am-form-group">
            <label for="user-name" class="am-u-sm-4 am-form-label">站点标题 / Title</label>
            <div class="am-u-sm-8">
              <input type="text" id="user-name" placeholder="站点标题 / Title" name="title" value="{$title}">
              <!-- <small>输入你的名字，让我们记住你。</small> -->
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-email" class="am-u-sm-4 am-form-label">前端域名 / Domains</label>
            <div class="am-u-sm-8">
              <input type="text" id="user-email" placeholder="前端域名 / Domains" name="domains" value="{$domains}">
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-email" class="am-u-sm-4 am-form-label">状态 / Status</label>
            <div class="am-btn-group am-u-sm-8" data-am-button>
              <label class="am-btn am-btn-default am-btn-xs {$status==1?='am-active'}">
                <input type="radio" name="status" id="option1" value="1" {$status==1?='checked'}> 开启
              </label>
              <label class="am-btn am-btn-default am-btn-xs {$status==2?='am-active'}">
                <input type="radio" name="status" id="option2" value="2" {$status==2?='checked'}> 关闭
              </label>
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-phone" class="am-u-sm-4 am-form-label">关键字 / Keywords</label>
            <div class="am-u-sm-8">
              <input type="text" id="user-phone" placeholder="关键字 / Keywords" name="keywords" value="{$keywords}">
              <small>百度收录关键字，80个字符以内，多个关键词用“,”隔开</small>
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-QQ" class="am-u-sm-4 am-form-label">描述 / Description</label>
            <div class="am-u-sm-8">
              <textarea class="" name="description" rows="5" id="user-intro" placeholder="描述 / Description">{$description}</textarea>
              <small>百度收录描述，220个字符以内，多个描述用“,”隔开</small>
            </div>
          </div>

          <div class="am-form-group">
            <div class="am-u-sm-8 am-u-sm-push-4">
                <input type="hidden" name="update_time" value="{:time()}">
                <input type="submit" class="am-btn am-btn-primary" value="保存修改">
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
{/block}

{block name="js"}
<script type="text/javascript">
    $('#conf_update').submit(function() {
        var index = layer.load(2);

        $(this).ajaxSubmit(function(data){
            layer.close(index);
            if(data == 1){
                layer.alert('保存成功！',{
                    icon:1,
                });
            }else{
                layer.alert(data,{
                    icon:2,
                });
            }
        })
        return false;
    })
</script>
{/block}
